package com.systop.asset.entity;

import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 资产维修记录对象 repair
 * 
 * @author cc
 * @date 2025-07-04
 */
public class Repair extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 维修ID */
    private Long id;

    /** 资产ID */
    private Long assetsId;

    /** 报修人id */
    private Long repairApply;

    /** 报修位置（位置id） */
    private Long locationId;

    /** 所属部门ID */
    private Long deptId;

    /** 维修单号 */
    private String repairNo;

    /** 报修描述 */
    private String faultDesc;

    /** 报修图片 */
    private String pic;

    /** 维修结果 */
    private String repairResult;

    /** 维修开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date startTime;

    /** 维修结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date endTime;

    /** 批次号 */
    private String batchNo;

    /** 状态 1-处理中 2-已完成 3-报废 4-已关闭 */
    private Integer status;

    /** 操作人 */
    private String operator;

    /** 软删除标记 */
    private Integer isDeleted;
    /** 资产名称 */
    private String assName;

    /** 资产详情单 */
    private List<RepairDetail> assets;

    public List<RepairDetail> getAssets() {
        return assets;
    }


    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setAssetsId(Long assetsId) 
    {
        this.assetsId = assetsId;
    }

    public Long getAssetsId() 
    {
        return assetsId;
    }
    public void setRepairApply(Long repairApply) 
    {
        this.repairApply = repairApply;
    }

    public Long getRepairApply() 
    {
        return repairApply;
    }
    public void setLocationId(Long locationId) 
    {
        this.locationId = locationId;
    }

    public Long getLocationId() 
    {
        return locationId;
    }
    public void setRepairNo(String repairNo) 
    {
        this.repairNo = repairNo;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getRepairNo() 
    {
        return repairNo;
    }
    public void setFaultDesc(String faultDesc) 
    {
        this.faultDesc = faultDesc;
    }

    public String getFaultDesc() 
    {
        return faultDesc;
    }
    public void setPic(String pic) 
    {
        this.pic = pic;
    }

    public String getPic() 
    {
        return pic;
    }
    public void setRepairResult(String repairResult) 
    {
        this.repairResult = repairResult;
    }

    public String getRepairResult() 
    {
        return repairResult;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setBatchNo(String batchNo) 
    {
        this.batchNo = batchNo;
    }

    public String getBatchNo() 
    {
        return batchNo;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    public void setIsDeleted(Integer isDeleted)
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted()
    {
        return isDeleted;
    }

    public String getAssName() {
        return assName;
    }

    public void setAssName(String assName) {
        this.assName = assName;
    }

    public void setAssets(List<RepairDetail> assets) {
        this.assets = assets;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("assetsId", getAssetsId())
            .append("repairApply", getRepairApply())
            .append("deptId", getDeptId())
            .append("locationId", getLocationId())
            .append("repairNo", getRepairNo())
            .append("faultDesc", getFaultDesc())
            .append("pic", getPic())
            .append("repairResult", getRepairResult())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("batchNo", getBatchNo())
            .append("status", getStatus())
            .append("operator", getOperator())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
